<div class="layuimini-container layuimini-page-anim">
  <div class="layuimini-main">
    <div style="margin: 20px 0;padding-left: 20px">
      <h3 style="margin-bottom: 10px">(2021)区县新考B类第4299期 淮南 第839期</h3>
      <h5>考试时间：2021/07/30 08:30~2021/07/30 10:30</h5>
    </div>
    <table class="layui-hide" id="currentTableId" lay-filter="currentTableFilter"></table>
    <script type="text/html" id="start">

      <div class="layui-form-item" style="margin-top: 100px">
        <label class="layui-form-label">时间设置</label>
        <div class="layui-input-inline">
          <input type="text" name="date" id="start-date" lay-verify="date" placeholder="yyyy-MM-dd" autocomplete="off" class="layui-input">
        </div>
      </div>
      <div class="layui-form-item">
        <div class="layui-input-block">
          <button class="layui-btn layui-btn-normal" lay-submit lay-filter="saveBtn">保存</button>
        </div>
      </div>
    </script>
  </div>
</div>

<script>
  var tableData = [
    {
      'id': 10000,
      name: '小明',
      idCard: '3424000000',
      img: 'http://placehold.it/350x200',
      type: 'B',
      count: '3424000000',
      jigou: '小明',
      beizhu: '无'
    },
    {
      'id': 10000,
      name: '小明',
      idCard: '3424000000',
      img: 'http://placehold.it/350x200',
      type: 'B',
      count: '3424000000',
      jigou: '小明',
      beizhu: '无'
    },
    {
      'id': 10000,
      name: '小明',
      idCard: '3424000000',
      img: 'http://placehold.it/350x200',
      type: 'B',
      count: '3424000000',
      jigou: '小明',
      beizhu: '无'
    },
    {
      'id': 10000,
      name: '小明',
      idCard: '3424000000',
      img: 'http://placehold.it/350x200',
      type: 'B',
      count: '3424000000',
      jigou: '小明',
      beizhu: '无'
    },
    {
      'id': 10000,
      name: '小明',
      idCard: '3424000000',
      img: 'http://placehold.it/350x200',
      type: 'B',
      count: '3424000000',
      jigou: '小明',
      beizhu: '无'
    },
    {
      'id': 10000,
      name: '小明',
      idCard: '3424000000',
      img: 'http://placehold.it/350x200',
      type: 'B',
      count: '3424000000',
      jigou: '小明',
      beizhu: '无'
    },
    {
      'id': 10000,
      name: '小明',
      idCard: '3424000000',
      img: 'http://placehold.it/350x200',
      type: 'B',
      count: '3424000000',
      jigou: '小明',
      beizhu: '无'
    }
  ]
  layui.use(['form', 'table', 'miniPage', 'element', 'laydate'], function () {
    var $ = layui.jquery,
      form = layui.form,
      table = layui.table,
      laydate = layui.laydate,
      miniPage = layui.miniPage

    table.render({
      elem: '#currentTableId',
      // url: 'api/table.json',
      data: tableData,
      toolbar: true,
      defaultToolbar: ['filter', 'exports', 'print',  {
        title: '返回',
        layEvent: 'LAYTABLE_BACK',
        icon: 'layui-icon-left'
      }],
      cols: [[
        { field: 'id', title: '序号', sort: true },
        { field: 'name', title: '用户名'},
        { field: 'idCard', title: '身份证号' },
        { title: '报名照片', templet: '<div><img src="{{d.img}}" class="layui-table-link" style="height: 100%"/></div>' },
        { field: 'type', title: '报名类型' },
        { field: 'count', title: '准考证号' },
        { field: 'jigou', title: '签字' },
        { field: 'beizhu', title: '备注'}
      ]],
      limits: [10, 15, 20, 25, 50, 100],
      limit: 5,
      page: true,
      skin: 'line'
    })

    table.on('toolbar(currentTableFilter)', function (obj) {
      if (obj.event === 'LAYTABLE_BACK') {   // 监听返回
        window.history.go(-1)
        // location.reload()
      }
    })
  })
</script>

